feature/random xp config#758
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new experience bonus system for parties to encourage group play and diversity in character classes. It updates the party logic to calculate experience based on party size and composition, while simultaneously removing the previous random factor in XP distribution to provide more predictable rewards. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request implements a dynamic experience bonus system for parties, rewarding larger groups and diverse character class compositions. It refactors the experience distribution logic in Party.cs and Player.cs, notably removing the random variation from solo experience gains. A critical issue was identified in the new party experience calculation, which currently omits the multiplier for the number of recipients, resulting in party members receiving significantly less experience than intended.
sven-n
left a comment
There was a problem hiding this comment.
I'd like to keep the original season 6 behavior, and that was with random exp. I'm also not sure if the exp bonuses for a full party of mixed classes was just 2%, I remember it was even higher.
It would be great if you could add some Stats, so that every admin can configure the desired behavior.
|
@sven-n I've reduced the scope of this PR, removing everything related to the party bonus. Now this only adds configurable random XP calculation configs. input.webm.mp4 |
There was a problem hiding this comment.
Code Review
This pull request introduces customizable random experience multipliers (RandomExperienceMinMultiplier and RandomExperienceMaxMultiplier) to replace the hardcoded 0.8 to 1.2 multiplier range when calculating experience gains for players and parties. It also includes database update plugins to initialize these new attributes across different game versions.
Feedback: There is a potential server crash risk in both Party.cs and Player.cs if the configured minimum multiplier is greater than or equal to the maximum multiplier, or if float rounding causes the calculated minimum experience to equal or exceed the maximum experience. In these cases, Rand.NextInt will throw an ArgumentOutOfRangeException. It is recommended to add a guard check to ensure min < max before calling Rand.NextInt.
Random XP calculation configs that use current values as default. To disable random XP, update the new configs to 0.